# filename: example8_18.py

class StudentClass:
    def __init__(self, name):
        self.name = name

    def printName(self):
        return self.name


class NameClass:
    def __init__(self, title):
        self.nick = title

    def printName(self):
        return self.nick + '同学'


class UndergraduateClass(StudentClass, NameClass):
    pass


stu1 = UndergraduateClass("张三")
print(stu1.printName())